package cn.xuewenbao.edu.controller;


import cn.xuewenbao.edu.entity.vo.OneSubjectVo;
import cn.xuewenbao.edu.service.OneSubjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;


import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author mafayu
 * @since 2021-07-08
 */
@RestController
@RequestMapping("/edu/onesubject")
@Api(tags = "一级分类表")
public class OneSubjectController {

    @Autowired
    private OneSubjectService oneSubjectService;

    //获取所有一级分类表
    @ApiOperation("获取所有一级分类表")
    @GetMapping("getAllOneSubject")
    public Result<List<OneSubjectVo>> getAllOneSubject(){
        Result<List<OneSubjectVo>> result = oneSubjectService.getAllOneSubject();
        return result;
    }

}

